#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

//#include <nvboard.h>

#include "include/sim.h"
#include "include/paddr.h"
#include "include/sdb.h"
#include "include/utils.h"

//dpi-c
#include "Vtop__Dpi.h"
#include <verilated_dpi.h>

NPCState npc_state;

extern "C" void ebreak(){
    printf("excute the ebreak inst\n");
    npc_state.state = NPC_END;
    iringbuf_read();
    //return 0;
    //while(1);
  }

int main(int argc, char** argv) {
  printf("Initial Begin \n");
  
  //nvboard_bind_all_pins(&dut);
  //nvboard_init();
  //reset(10);
  
  init_mem();
  init_monitor(argc, argv);
  cpu_sim_init();
  sdb_mainloop();

  // while(main_time < MAXTIME)
  //   exec_once(tfp);
	
  tfp->close();

  return 0;
}
